#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <queue>
#include <vector>
#include <unordered_map>
QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_tabWidget_tabCloseRequested(int index);

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_tabWidget_currentChanged(int index);

private:
    Ui::Widget *ui;
    std::priority_queue<int, std::vector<int>, std::greater<int>> pq;
    std::unordered_map<QWidget*, int> hash;
};
#endif // WIDGET_H
